<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<body>
<c:if test="${name == null}">
    <div class="login-wrapper">
        <form action="${pageContext.request.contextPath }/UserServlet" method="post">

            <div class="h4">登录</div>
            <div class="form-group">
                <input type="text" name="name" value="${name}" class="form-control" id="exampleInputEmail1" placeholder="Name">
            </div>
            <input type="hidden" name="method" value="login" />
            <div class="form-group">

                <input type="password" name="password" value="${password}" class="form-control" id="exampleInputPassword1" placeholder="Password">
            </div>
            <div class="form-group" id="ss">
                <a href="${pageContext.request.contextPath }/html/forget-password.jsp" class="open-popup" id="s1">忘记密码?</a>
                <a href="${pageContext.request.contextPath }/html/regist1.jsp" class="open-" id="s2">点击注册?</a>
            </div>
            <button type="submit" class="btn btn-block btn-main">登录</button>
        </form>
    </div>
</c:if>
<!-- ==========  person-wrapper ========== -->
<c:if test="${name!= null}">
    <div class="login-wrapper">
        <div class="personal-center">
            <div class="image-user">
                <img src="${pageContext.request.contextPath}/assets/images/user6.jpg" alt="Alternate Text" id="picture" onclick="tran()"/>
            </div>
            <div class="h5 title" style="text-align: center">${name}</div>
            <hr />
            <p><a href="mailto:johndoe@mail.com" style="font-size: large"><i class="icon icon-envelope"></i>${useremail}</a></p>
            <p><a href="tel:002255858" style="font-size: large"><i class="icon icon-phone-handset"></i> +${userphone}</a></p>
            <p>
                <a href="${pageContext.request.contextPath}/html/gerenzhongxin.jsp" class="btn btn-main btn-xs"><i class="icon icon-user"></i></a>
            </p>
        </div> <!--/name-->

    </div>
</c:if>


</body>
</html>
<script>
    function tran() {
        location.href = "${pageContext.request.contextPath}/html/gerenzhongxin.jsp";
    }
</script>
